import { request } from '@/utils/request';
import type { PropertyResult } from '@/api/house/model/propertyModel';

const Api = {
  PropertyQuery: '/house.property/query',
  PropertySave: '/house.property/save',
  PropertyDelete: '/house.property/delete',
  PropertySort: '/house.property/sort',
};

export function getProperty() {
  return request.get<PropertyResult>({
    url: Api.PropertyQuery,
  });
}

export function saveProperty(data: any) {
  return request.post({
    url: Api.PropertySave,
    params: data,
  });
}

export function deleteProperty(data: any) {
  return request.post({
    url: Api.PropertyDelete,
    params: data,
  });
}

export function sortProperty(data: any) {
  return request.post({
    url: Api.PropertySort,
    params: data,
  });
}
